[For best viewing make sure you turn on WordWrap.] *==================================* | RPN Calc Version 1.0 | | Copyright (c) 1996 Bill Menees | | All Rights Reserved | *==================================* Table of Contents ================= * Introduction History * Using the Calculator Buttons Things to Consider * Using the Menu Commands * Other Features * Design In the Future * Money Registering by Credit Card Registering by Other Means * Contacting the Author * Thanks * Distribution * Standard Disclaimer Introduction ============ RPN Calc is a 32-Bit Reverse Polish Notation (RPN) calculator applet for Windows 95 and Windows NT. It sort of has the look and feel of the HP48, so if you're familier with that you should be right at home with RPN Calc. If you have never used an RPN calculator before it can be quite a shock. The thing to remember is that you must enter your operands (arguments) before you enter your operator (function). For example, to add 3 and 5 you would do the following: 3 ENTER 5 ENTER +. This may sound awkward at first, but once you get the hang of it it's wonderful. Really. History ======= I wrote RPN Calc because I needed a good calculator applet at work, and I couldn't stand using the Windows algebraic calculator. I also couldn't find an existing RPN calculator applet anywhere that I liked. So I spent a day writing the basic version and then a few more weeks polishing it and making my friends beta test it. Using the Calculator Buttons ============================ Hopefully, it's obvious that you can use the mouse to operate RPN Calc. However, you can also use the keyboard. Pressing F1 in RPN Calc will bring up a dialog box that lists all of the keys you can press on the keyboard to activate functions on the calculator. For example, pressing 'N' (or 'n') on the computer's keyboard will press the ± button on the calculator. On many calculator buttons a letter is underlined. To activate that calculator button, press the underlined letter on your keyboard. These visual cues save you from having to remember too many keyboard commands. The few buttons that don't have an underlined character have easy to remember keyboard equivalents. For your convienience the entire list of Buttons and their keyboard equivalents is listed here (a few of the characters will not display correctly unless you are viewing this with a Windows text editor): G: Log Shift: Shift L: Ln Space: Spc M: Mod +: + N: Neg (±) -: - O: Cos *: × P: Pi /: ÷ Q: Sqrt Enter: Enter R: Rdc Backspace: <-/Drop S: Sin 0-9: 0-9 T: Tan A-F: A-F W: Swap X: EEX Y: Y^x Z: Last Each button also has a command listed above it. To activate that command press the Shift button (or the shift key on the keyboard) and then click the button (or type it's keyboard equivalent). The color of the function names will change to indicate which ones are active whenever the shift button changes state (shifted or unshifted). The use of most of the functions should be obvious; however, a few need a little explanation. LAST: Returns the last argument(s) used by a command. RDC: Takes two integer parameters and reduces the fraction they would make. A/B: Converts small floating point values to fractions. Relatively small domain. XROOT: Takes the Xth root of y. It can't take a fractional power of a negative number or an even root of a negative number. EDIT: Moves the value in level 1 of the stack to the number edit line. FIX: Takes an integer from -1 to 18 as an argument. For 0 to 18 the display then fixes the decimal point with that many digits. For -1, FIX mode is turned off. SIGMA: This sums everything on the stack. Things to Consider ================== Wherever possible I tried to make my functions work like they work on HP's RPN calculators. For example, Backspace works like Backspace when you are editing a number for entry, but it executes the Drop command (whether or not Shift is pressed) if you press it when you aren't editing a number. However, I did change some functions to make the implementation easier. For example, Spc doesn't put a space on the number edit line; it works exactly like Enter. The reason for this change was that since we are only dealing with numbers there is no reason to enter a space on the number edit line. A few of the functions have restricted domains for various reasons. The most common reason is to avoid imaginary numbers. HP calculators implement them beautifully, but I haven't yet so my functions don't work on as large a domain. Another common reason for restricted domains on my functions is that I wrote some of them to only work on integers. For example, my factorial function only works on nonnegative integers. HP's calculators can do numerical integration on the Gamma function to calculate "factorials" for many floating-point values. The moral is this: RPN Calc is good, but it's no HP. If you want the ultimate calculator, you don't want RPN Calc; you want an HP48 (or newer). If you want a good RPN calculator for Windows then you should be able to live with (and hopefully enjoy) RPN Calc. Using the Menu Commands ======================= The "File" menu lets you Open and Save stacks as well as print the current stack to a file or printer. The "Menus" menu contains many additional functions that I didn't want to try to cram on the main calculator form as buttons. They all behave in the same way as the calculator buttons though. Finally, the "Options" menu controls what trig units are used, what base to work in, and whether the calculator is in "Stay On Top" mode or not. The menu functions that have a shortcut key listed beside them can be typed directly (e.g. Ctrl+O for Open). To execute the other functions you must navigate through the menus with the mouse or keyboard. Other Features ============== Between uses RPN Calc retains almost all of it's state information. That is, when you exit it, it remembers the current stack, fix length, last argument(s), "Stay On Top" mode, trig units, base, and window position. The next time you run RPN Calc these values are automatically loaded, so it appears like you never left the program. [For the tinkerers out there: The stack and settings are stored in the registry key 'HKEY_CURRENT_USER\Software\Menees\RPN Calc\1.0'. If you ever want to uninstall RPN Calc, you can delete this key.] If you are running RPN Calc on a system that uses the Win95 shell, you will have an extra button to minimize it to the system tray on the taskbar. This is cool because you can keep it running and pop it up when you need it. To make RPN Calc minimize to the system tray on startup, pass it the command line parameter '/Tray'. Design ====== The first thing you may be wondering is why I made RPN Calc a Win32-only app. The answer is that Delphi 2.0's math library has lots more functions than Delphi 1.0's. I could have left out some features and produced a 16-bit version, but since I and all of my coworkers use 32-bit Windows systems I decided to go for more functionality and Win32. If by some miracle I get lots of requests for a Win16 version I may consider it... I had to make error reporting slightly different depending on whether RPN Calc is in "Stay On Top" mode. When "Stay On Top" mode is NOT active the error message dialog will popup directly over the calculator "screen". When "Stay On Top" mode IS active the error dialog will appear out to the side of the calculator. This was necessary to prevent the error message dialog from appearing behind the main form (because it always stays on top). To speed up development I implemented the stack internally as a TStringList (Delphi's linked list of strings class). The benefit of this is that I had a working class I could use as a Stack at the beginning of the program. The drawback to this is that the floating point numbers are being store internally as strings. Thus with each operation there can be a slight round-off error as the values are converted to and from strings. To lessen the effect of this limitation a bit I always store the full 18-19 digits of each floating-point value in the stack, and I only display a default of 15 digits. This way the round-off error should be hidden from the user except in long calculations. If this is a big problem for you, you can always use the Fix command to set the precision you want to see. In the Future ============= Additions I have planned for future versions include: support for complex numbers; user defined variables; improved precision (through the use of an actual stack of floating-point numbers); and any other suggestions I receive that pass my standards of coolness. Actually, the existence of a future versions will depend partially on my need for new features in RPN Calc and partially on the feedback I get from users. If a lot of people tell me they like it AND REGISTER IT (!), then that will encourage me to develop it further. If I never hear from anyone, that will be a strong incentive for me to not release any new versions. Money ===== With all the above rambling out of the way let's get down to a little business. I think RPN Calc is a cool, useful utility. If you think so too you need to pay me a little something to continue using it. My shareware policy is this: $15 (US) per copy in use at any one time. If you use a copy at work and at home but NEVER at the same time, then you only need to pay for one copy. If you are using a copy at work, and your kids are using a copy at home, then you need to pay for two copies. Just pay for the number of copies that will actually be in use at the same time. Regardless of how you register, please have the following information ready: 1) The program name (RPN Calc) and version number (1.0). 2) Where the latest version should be mailed. You will receive it on a 3.5" disk. Registering by Credit Card ========================== For your convenience I have contracted NorthStar Solutions to process any orders that you wish to place with your valid Visa or Mastercard. They may be contacted FOR ORDERS ONLY via any of the following methods: Voice: 1-800-699-6395 (10am - 10pm EST) (Calls from the U.S. only.) 1-803-699-6395 (10am - 10pm EST) Fax: 1-803-699-5465 (Available 24 hours. International and business orders encouraged.) E-Mail: AOL: StarMail Compuserve: 71561,2751 Internet: starmail@aol.com IMPORTANT NOTES: 1) Please have your Visa or Mastercard number and its expiration date ready. 2) NorthStar Solutions processes registrations only; please contact the author for any product/technical support. 3) E-mailed and faxed registrations are encouraged, but all registrations are very much appreciated. Registering by Other Means ========================== Send cash, check, money order, or other form of payment made payable to: Bill Menees 4086 Turner Road Rives, TN 38253 USA Contacting the Author ===================== If you have any comments, suggestions, praise, questions, etc. mail them to the above address or (preferably) e-mail them to one (or both) of the following addresses: BMenees@usit.net Menees@aol.com Thanks ====== Special thanks to Brian Boyd and Chris Crabtree for doing all the beta testing for me. Without them RPN Calc wouldn't be near as nice as it is. Distribution ============ 1) You may distribute unlimited copies of this program in its original form to any legal place unless I notify you otherwise. 2) You may charge a copying/distribution fee as long as the total does not exceed $9.00. 3) You must make it clear that users are NOT purchasing the software and that they must contact the author to legally register their shareware. Standard Disclaimer =================== This software is provided AS IS without warranty of any kind, either expressed or implied. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair, or correction. In no event shall the author, copyright holder, or any other party who may redistribute the software be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the program (including, but not limited to, loss of data, data being rendered inaccurate, loss of business profits, loss of business information, business interruptions, loss sustained by you or third parties, or a failure of the program to operate with any other programs), even if the author, copyright holder, or other party has been advised of the possibility of such damages.